﻿package com.wly.control.gamescene
{
	import com.wly.control.PlayerInfoControl;
	import com.wly.control.common.BaseControl;
	import com.wly.ui.gamescene.GameScene;
	
	public class GameSceneControl extends BaseControl
	{
		private var _playerInfoCtrl:PlayerInfoControl;
		
		public function GameSceneControl()
		{
			super();
			
			_playerInfoCtrl = new PlayerInfoControl();
		}
		
		protected function get gameScene():GameScene
		{
			return _ui  as GameScene;
		}
		
		override protected function onUIAttach():void
		{
			if(gameScene)
			{
				gameScene.updatePlayerInfoCtrl(_playerInfoCtrl);
			}
		}

		override public function updateUI():void
		{
			_playerInfoCtrl.updateUI();
		}
		
		public function goBack():void
		{
			trace(this, "goBack");
		}
	}
}